package com.hneve.androiduiclassone4;

import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

/**
 * Created by Administrator on 2018/6/6.
 */


public class MyDialog extends Dialog {
   public String dialogNamge;
    public  MyDialog( Context context,String dialogName){

        super(context);
        this.dialogNamge= dialogName;

    }
    @Override
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mydialog);
        TextView msg=(TextView)findViewById(R.id.tv_message);
        Button ok= findViewById(R.id.ok);
        Button cancel = findViewById(R.id.cancel);

        ok .setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
        cancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }
}
